package com.jpro.module.system.api.notice;

import com.jpro.framework.common.pojo.CommonResult;
import com.jpro.framework.common.pojo.PageResult;
import com.jpro.framework.common.util.collection.CollectionUtils;
import com.jpro.module.system.api.dept.dto.DeptRespDTO;
import com.jpro.module.system.api.notice.dto.NoticePageReqDTO;
import com.jpro.module.system.api.notice.dto.NoticeRespDTO;
import com.jpro.module.system.enums.ApiConstants;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import java.util.Collection;
import java.util.List;
import java.util.Map;

@FeignClient(name = ApiConstants.NAME)
@Tag(name = "RPC 服务 - 通知公告")
public interface NoticeApi {

    String PREFIX = ApiConstants.PREFIX + "/notice";

    @PostMapping(value = PREFIX + "/get")
    @Operation(summary = "获得通知公告")
    @Parameter(name = "id", description = "通知公告编号", example = "1024", required = true)
    CommonResult<NoticeRespDTO> getNotice(@RequestParam("id") Long id);

    @PostMapping(value = PREFIX + "/page")
    @Operation(summary = "获得通知公告分页")
    CommonResult<PageResult<NoticeRespDTO>> getNoticePage(@Validated  @RequestBody NoticePageReqDTO pageReqVO);

    @PostMapping(value = PREFIX + "/list")
    @Operation(summary = "获得通知公告列表")
    CommonResult<List<NoticeRespDTO>> getNoticeList(@Validated @RequestBody NoticePageReqDTO pageReqVO);

}
